<template>
  <div class="a-box">
    A
    {{ result.msg }} {{ result.data }}
    <ul @click="handleClick(item)" v-for="item in result.data" :key="item.id">
      {{
        item.city
      }}
    </ul>
  </div>
</template>
<script>
export default {
  props: ['result'],
  methods: {
    handleClick(item) {
      // 子父传递参数，叫通知
      this.$emit('onClick', item.city)
    },
  },
}
</script>
<style lang="scss" scoped>
.a-box {
  height: 150px;
  border: 1px solid #000;
  border-radius: 10px;
}
</style>
